package com.example.plugin_native.api

import com.example.plugin_native.entity.FarmPrincipal
import com.example.plugin_native.entity.PlotInfoData
import com.example.plugin_native.entity.PlotType
import com.support.net.Http
import com.support.net.Response
import retrofit2.http.*

interface CreateFarmApi {
    /**
     * 获取农场所有地块信息
     */
    @POST("PlotServiceApi/findAll")
    suspend fun findFarmProcessingPlanList(
        @HeaderMap header: Map<String, String> = Http.headers,
        @Body param: Any
    ): Response<ArrayList<PlotInfoData>>

    /**
     * 获取农场人员列表
     */
    @POST("findFarmUsers")
    suspend fun findFarmUsers(
        @HeaderMap header: Map<String, String> = Http.headers,
        @Body param: Any
    ): Response<ArrayList<FarmPrincipal>>

    /**
     * 获取地块类型
     */
    @POST("FarmPlotJsfService/getPlotTypes")
    suspend fun getPlotTypes(
        @HeaderMap header: Map<String, String> = Http.headers,
    ): Response<ArrayList<PlotType>>

    /**
     * 添加地块
     */
    @POST("FarmPlotJsfService/addPlot")
    suspend fun addPlot(
        @HeaderMap header: Map<String, String> = Http.headers,
        @Body param: Any
    ): Response<Any>
}